{
 v1 -* Made by Phalanx *-
 Start in draynor bank with a sleeping bag and the required tools.

 Works for both P2P and F2P
 Just set the required settings and you are good to go. :)

 Notice: * Rotate the map MENUALLY to head almost perfect north.
         * Compitable with scar 112.
}

Program DraynorFisher;
{.include PhalanxInclude.txt}
Const
 ClickMapDel = 5  ;
Type
 TForm1=TForm;
Var
 FishingPath, BankPath, FirePath:integer;
 AtBank, FishingSpot:integer;
 UpLine,ItemNames,CatchType,TempStr:String;
 StartCheck:boolean;
 StartingFishCount,CurrentFishCount:LongInt;
 BKC,C,l:integer;
 ItemNamesArr:StrArr;

 FishingM, Fish, Cook:integer;
 Edt_UserName, Edt_PassWord, Edt_BTPR, Edt_SWDelay, Edt_KS : TEdit;
 Btn_Cancel, Btn_OK : TButton;
 ComboBox_FMode, ComboBox_FishType : TComboBox;
 CheckBox_Cook : TCheckBox;

 Start:boolean;
procedure OKClick (sender: TObject);
var
 MaxF:integer;
 BoolStr:string;
begin
  SaveSetting('Phalanx_Draynor_Fisher', 'username', Edt_UserName.Text);
  SaveSetting('Phalanx_Draynor_Fisher', 'password', Edt_PassWord.Text);
  SaveSetting('Phalanx_Draynor_Fisher', 'SWDelay', Edt_SWDelay.Text);
  SaveSetting('Phalanx_Draynor_Fisher', 'KillSwitch', Edt_KS.Text);
  SaveSetting('Phalanx_Draynor_Fisher', 'BTPR', Edt_BTPR.Text);
  SaveSetting('Phalanx_Draynor_Fisher', 'FMode', IntToStr(ComboBox_FMode.ItemIndex));
  SaveSetting('Phalanx_Draynor_Fisher', 'FishType', IntToStr(ComboBox_FishType.ItemIndex));
  if CheckBox_Cook.Checked then BoolStr:='1' else BoolStr:='0';
  SaveSetting('Phalanx_Draynor_Fisher', 'Cook', BoolStr);
  Case StrToInt(LoadSetting('Phalanx_Draynor_Fisher', 'FishType')) of
   1:begin
      UpLine:='fish: Net';
      CatchType:='Net';
      ItemNames:='Shrimp, Anchovie,';
      MaxF:=99;
     end;
   2:begin
      UpLine:='fish: Net';
      CatchType:='Bait';
      ItemNames:='Herring, Sardine,';
      MaxF:=98;
     end;
  end;
 InitInclude(LoadSetting('Phalanx_Draynor_Fisher', 'username'),LoadSetting('Phalanx_Draynor_Fisher', 'password'),StrToInt(LoadSetting('Phalanx_Draynor_Fisher', 'SWDelay')),ClickMapDel,MaxF,StrToInt(LoadSetting('Phalanx_Draynor_Fisher', 'KillSwitch')));
 FishingM:=StrToInt(LoadSetting('Phalanx_Draynor_Fisher', 'FMode'));
 Fish:=StrToInt(LoadSetting('Phalanx_Draynor_Fisher', 'FishType'));
 cook:=StrToInt(LoadSetting('Phalanx_Draynor_Fisher', 'Cook'));
 Start:=True;
end;
procedure CancelClick (sender: TObject);
begin
 Start:=False;
end;
Procedure CallMainForm;
var
  Form1 : TForm1;
  Lbl_FishType, Lbl_UserName, Lbl_PassWord, Lbl_FMode, Lbl_BTPR, Lbl_SWDelay, Lbl_KS, Topic_UserSettings, Topic_FishingSettings, Topic_MiscSettings : TLabel;
  Bevel1, Bevel2, Bevel3 : TBevel;
begin
  Form1 := TForm1.Create(nil);
  Form1.Left := 10;
  Form1.Top := 10;
  Form1.Width := 297;
  Form1.Height := 417;
  Form1.Caption := 'Fishing Script - By Phalanx';
  Form1.Color := clBtnFace;
  Form1.Font.Color := clWindowText;
  Form1.Font.Height := -11;
  Form1.Font.Name := 'MS Sans Serif';
  Form1.Font.Style := [];
  Form1.PixelsPerInch := 96;
  Lbl_UserName := TLabel.Create(Form1);
  Lbl_UserName.Parent := Form1;
  Lbl_UserName.Left := 8;
  Lbl_UserName.Top := 32;
  Lbl_UserName.Width := 68;
  Lbl_UserName.Height := 19;
  Lbl_UserName.Caption := 'User name:';
  Lbl_UserName.Font.Color := clWindowText;
  Lbl_UserName.Font.Height := -16;
  Lbl_UserName.Font.Name := 'Times New Roman';
  Lbl_UserName.Font.Style := [];
  Lbl_UserName.ParentFont := False;
  Lbl_PassWord := TLabel.Create(Form1);
  Lbl_PassWord.Parent := Form1;
  Lbl_PassWord.Left := 8;
  Lbl_PassWord.Top := 64;
  Lbl_PassWord.Width := 63;
  Lbl_PassWord.Height := 19;
  Lbl_PassWord.Caption := 'Password:';
  Lbl_PassWord.Font.Color := clWindowText;
  Lbl_PassWord.Font.Height := -16;
  Lbl_PassWord.Font.Name := 'Times New Roman';
  Lbl_PassWord.Font.Style := [];
  Lbl_PassWord.ParentFont := False;
  Lbl_FMode := TLabel.Create(Form1);
  Lbl_FMode.Parent := Form1;
  Lbl_FMode.Left := 8;
  Lbl_FMode.Top := 128;
  Lbl_FMode.Width := 83;
  Lbl_FMode.Height := 19;
  Lbl_FMode.Caption := 'Fishing mode:';
  Lbl_FMode.Font.Color := clWindowText;
  Lbl_FMode.Font.Height := -16;
  Lbl_FMode.Font.Name := 'Times New Roman';
  Lbl_FMode.Font.Style := [];
  Lbl_FMode.ParentFont := False;
  Lbl_BTPR := TLabel.Create(Form1);
  Lbl_BTPR.Parent := Form1;
  Lbl_BTPR.Left := 8;
  Lbl_BTPR.Top := 248;
  Lbl_BTPR.Width := 183;
  Lbl_BTPR.Height := 19;
  Lbl_BTPR.Caption := 'Bankings until progress report:';
  Lbl_BTPR.Font.Color := clWindowText;
  Lbl_BTPR.Font.Height := -16;
  Lbl_BTPR.Font.Name := 'Times New Roman';
  Lbl_BTPR.Font.Style := [];
  Lbl_BTPR.ParentFont := False;
  Lbl_SWDelay := TLabel.Create(Form1);
  Lbl_SWDelay.Parent := Form1;
  Lbl_SWDelay.Left := 8;
  Lbl_SWDelay.Top := 280;
  Lbl_SWDelay.Width := 196;
  Lbl_SWDelay.Height := 19;
  Lbl_SWDelay.Caption := 'Sleep walking delay (in minutes):';
  Lbl_SWDelay.Font.Color := clWindowText;
  Lbl_SWDelay.Font.Height := -16;
  Lbl_SWDelay.Font.Name := 'Times New Roman';
  Lbl_SWDelay.Font.Style := [];
  Lbl_SWDelay.ParentFont := False;
  Lbl_KS := TLabel.Create(Form1);
  Lbl_KS.Parent := Form1;
  Lbl_KS.Left := 8;
  Lbl_KS.Top := 312;
  Lbl_KS.Width := 69;
  Lbl_KS.Height := 19;
  Lbl_KS.Caption := 'Kill Switch:';
  Lbl_KS.Font.Color := clWindowText;
  Lbl_KS.Font.Height := -16;
  Lbl_KS.Font.Name := 'Times New Roman';
  Lbl_KS.Font.Style := [];
  Lbl_KS.ParentFont := False;
  Topic_UserSettings := TLabel.Create(Form1);
  Topic_UserSettings.Parent := Form1;
  Topic_UserSettings.Left := 8;
  Topic_UserSettings.Top := 8;
  Topic_UserSettings.Width := 103;
  Topic_UserSettings.Height := 21;
  Topic_UserSettings.Caption := 'User Settings:';
  Topic_UserSettings.Font.Color := clWindowText;
  Topic_UserSettings.Font.Height := -19;
  Topic_UserSettings.Font.Name := 'Times New Roman';
  Topic_UserSettings.Font.Style := [];
  Topic_UserSettings.ParentFont := False;
  Topic_FishingSettings := TLabel.Create(Form1);
  Topic_FishingSettings.Parent := Form1;
  Topic_FishingSettings.Left := 8;
  Topic_FishingSettings.Top := 104;
  Topic_FishingSettings.Width := 122;
  Topic_FishingSettings.Height := 21;
  Topic_FishingSettings.Caption := 'Fishing Settings:';
  Topic_FishingSettings.Font.Color := clWindowText;
  Topic_FishingSettings.Font.Height := -19;
  Topic_FishingSettings.Font.Name := 'Times New Roman';
  Topic_FishingSettings.Font.Style := [];
  Topic_FishingSettings.ParentFont := False;
  Topic_MiscSettings := TLabel.Create(Form1);
  Topic_MiscSettings.Parent := Form1;
  Topic_MiscSettings.Left := 8;
  Topic_MiscSettings.Top := 224;
  Topic_MiscSettings.Width := 105;
  Topic_MiscSettings.Height := 21;
  Topic_MiscSettings.Caption := 'Misc Settings:';
  Topic_MiscSettings.Font.Color := clWindowText;
  Topic_MiscSettings.Font.Height := -19;
  Topic_MiscSettings.Font.Name := 'Times New Roman';
  Topic_MiscSettings.Font.Style := [];
  Topic_MiscSettings.ParentFont := False;
  Bevel1 := TBevel.Create(Form1);
  Bevel1.Parent := Form1;
  Bevel1.Left := 0;
  Bevel1.Top := 96;
  Bevel1.Width := 289;
  Bevel1.Height := 2;
  Bevel2 := TBevel.Create(Form1);
  Bevel2.Parent := Form1;
  Bevel2.Left := -16;
  Bevel2.Top := 216;
  Bevel2.Width := 305;
  Bevel2.Height := 2;
  Bevel3 := TBevel.Create(Form1);
  Bevel3.Parent := Form1;
  Bevel3.Left := -16;
  Bevel3.Top := 344;
  Bevel3.Width := 305;
  Bevel3.Height := 2;
  Lbl_FishType := TLabel.Create(Form1);
  Lbl_FishType.Parent := Form1;
  Lbl_FishType.Left := 8;
  Lbl_FishType.Top := 160;
  Lbl_FishType.Width := 58;
  Lbl_FishType.Height := 19;
  Lbl_FishType.Caption := 'Fish type:';
  Lbl_FishType.Font.Color := clWindowText;
  Lbl_FishType.Font.Height := -16;
  Lbl_FishType.Font.Name := 'Times New Roman';
  Lbl_FishType.Font.Style := [];
  Lbl_FishType.ParentFont := False;
  CheckBox_Cook := TCheckBox.Create(Form1);
  CheckBox_Cook.Parent := Form1;
  CheckBox_Cook.Left := 8;
  CheckBox_Cook.Top := 192;
  CheckBox_Cook.Width := 273;
  CheckBox_Cook.Height := 17;
  CheckBox_Cook.Caption := 'Cook fish?';
  CheckBox_Cook.Font.Color := clWindowText;
  CheckBox_Cook.Font.Height := -16;
  CheckBox_Cook.Font.Name := 'Times New Roman';
  CheckBox_Cook.Font.Style := [];
  CheckBox_Cook.ParentFont := False;
  CheckBox_Cook.TabOrder := 4;
  Edt_UserName := TEdit.Create(Form1);
  Edt_UserName.Parent := Form1;
  Edt_UserName.Left := 80;
  Edt_UserName.Top := 32;
  Edt_UserName.Width := 201;
  Edt_UserName.Height := 27;
  Edt_UserName.Font.Color := clWindowText;
  Edt_UserName.Font.Height := -16;
  Edt_UserName.Font.Name := 'Times New Roman';
  Edt_UserName.Font.Style := [];
  Edt_UserName.ParentFont := False;
  Edt_UserName.TabOrder := 0;
  Edt_PassWord := TEdit.Create(Form1);
  Edt_PassWord.Parent := Form1;
  Edt_PassWord.Left := 80;
  Edt_PassWord.Top := 64;
  Edt_PassWord.Width := 201;
  Edt_PassWord.Height := 27;
  Edt_PassWord.Font.Color := clWindowText;
  Edt_PassWord.Font.Height := -16;
  Edt_PassWord.Font.Name := 'Times New Roman';
  Edt_PassWord.Font.Style := [];
  Edt_PassWord.ParentFont := False;
  Edt_PassWord.TabOrder := 1;
  Edt_PassWord.PasswordChar := '*';
  Edt_BTPR := TEdit.Create(Form1);
  Edt_BTPR.Parent := Form1;
  Edt_BTPR.Left := 208;
  Edt_BTPR.Top := 248;
  Edt_BTPR.Width := 73;
  Edt_BTPR.Height := 27;
  Edt_BTPR.Font.Color := clWindowText;
  Edt_BTPR.Font.Height := -16;
  Edt_BTPR.Font.Name := 'Times New Roman';
  Edt_BTPR.Font.Style := [];
  Edt_BTPR.ParentFont := False;
  Edt_BTPR.TabOrder := 5;
  Edt_SWDelay := TEdit.Create(Form1);
  Edt_SWDelay.Parent := Form1;
  Edt_SWDelay.Left := 208;
  Edt_SWDelay.Top := 280;
  Edt_SWDelay.Width := 73;
  Edt_SWDelay.Height := 27;
  Edt_SWDelay.Font.Color := clWindowText;
  Edt_SWDelay.Font.Height := -16;
  Edt_SWDelay.Font.Name := 'Times New Roman';
  Edt_SWDelay.Font.Style := [];
  Edt_SWDelay.ParentFont := False;
  Edt_SWDelay.TabOrder := 6;
  Edt_KS := TEdit.Create(Form1);
  Edt_KS.Parent := Form1;
  Edt_KS.Left := 208;
  Edt_KS.Top := 312;
  Edt_KS.Width := 73;
  Edt_KS.Height := 27;
  Edt_KS.Font.Color := clWindowText;
  Edt_KS.Font.Height := -16;
  Edt_KS.Font.Name := 'Times New Roman';
  Edt_KS.Font.Style := [];
  Edt_KS.ParentFont := False;
  Edt_KS.TabOrder := 7;
  ComboBox_FMode := TComboBox.Create(Form1);
  ComboBox_FMode.Parent := Form1;
  ComboBox_FMode.Left := 96;
  ComboBox_FMode.Top := 128;
  ComboBox_FMode.Width := 185;
  ComboBox_FMode.Height := 27;
  ComboBox_FMode.Font.Color := clWindowText;
  ComboBox_FMode.Font.Height := -16;
  ComboBox_FMode.Font.Name := 'Times New Roman';
  ComboBox_FMode.Font.Style := [];
  ComboBox_FMode.ItemHeight := 19;
  ComboBox_FMode.ParentFont := False;
  ComboBox_FMode.TabOrder := 2;
  ComboBox_FMode.Items.Add('Choose your fishing mode...');
  ComboBox_FMode.Items.Add('1 - Fish - Cook - Bank');
  ComboBox_FMode.Items.Add('2 - Power Fishing');
  Btn_Cancel := TButton.Create(Form1);
  Btn_Cancel.Parent := Form1;
  Btn_Cancel.Left := 8;
  Btn_Cancel.Top := 352;
  Btn_Cancel.Width := 129;
  Btn_Cancel.Height := 25;
  Btn_Cancel.Caption := 'Cancel';
  Btn_Cancel.Font.Color := clWindowText;
  Btn_Cancel.Font.Height := -16;
  Btn_Cancel.Font.Name := 'Times New Roman';
  Btn_Cancel.Font.Style := [];
  Btn_Cancel.ParentFont := False;
  Btn_Cancel.TabOrder := 9;
  Btn_OK := TButton.Create(Form1);
  Btn_OK.Parent := Form1;
  Btn_OK.Left := 144;
  Btn_OK.Top := 352;
  Btn_OK.Width := 129;
  Btn_OK.Height := 25;
  Btn_OK.Caption := 'OK';
  Btn_OK.Default := True;
  Btn_OK.Font.Color := clWindowText;
  Btn_OK.Font.Height := -16;
  Btn_OK.Font.Name := 'Times New Roman';
  Btn_OK.Font.Style := [];
  Btn_OK.ParentFont := False;
  Btn_OK.TabOrder := 8;
  ComboBox_FishType := TComboBox.Create(Form1);
  ComboBox_FishType.Parent := Form1;
  ComboBox_FishType.Left := 96;
  ComboBox_FishType.Top := 160;
  ComboBox_FishType.Width := 185;
  ComboBox_FishType.Height := 27;
  ComboBox_FishType.Font.Color := clWindowText;
  ComboBox_FishType.Font.Height := -16;
  ComboBox_FishType.Font.Name := 'Times New Roman';
  ComboBox_FishType.Font.Style := [];
  ComboBox_FishType.ItemHeight := 19;
  ComboBox_FishType.ParentFont := False;
  ComboBox_FishType.TabOrder := 3;
  ComboBox_FishType.Items.Add('Choose the fish you want to fish');
  ComboBox_FishType.Items.Add('1 - Shrimps and anchobi.');
  ComboBox_FishType.Items.Add('2 - Bait fishing fish.');

  //Defaults
  Edt_UserName.Text:=LoadSetting('Phalanx_Draynor_Fisher', 'username');
  Edt_PassWord.Text:=LoadSetting('Phalanx_Draynor_Fisher', 'password');
  Edt_BTPR.Text:=LoadSetting('Phalanx_Draynor_Fisher', 'BTPR');
  Edt_SWDelay.Text:=LoadSetting('Phalanx_Draynor_Fisher', 'SWDelay');
  Edt_KS.Text:=LoadSetting('Phalanx_Draynor_Fisher', 'KillSwitch');
  if LoadSetting('Phalanx_Draynor_Fisher', 'FMode') <> NIL then
   ComboBox_FMode.ItemIndex:=StrToInt(LoadSetting('Phalanx_Draynor_Fisher', 'FMode'))
  else ComboBox_FMode.ItemIndex:=0;
  if LoadSetting('Phalanx_Draynor_Fisher', 'FishType') <> NIL then
   ComboBox_FishType.ItemIndex:=StrToInt(LoadSetting('Phalanx_Draynor_Fisher', 'FishType'))
  else ComboBox_FishType.ItemIndex:=0;
  CheckBox_Cook.Checked:=LoadSetting('Phalanx_Draynor_Fisher', 'Cook')='1';

  Btn_OK.OnClick := @OKClick;
  Btn_OK.ModalResult:= mrOk;

  Btn_Cancel.OnClick := @CancelClick;
  Btn_Cancel.ModalResult:= mrOk;

  Form1.ShowModal;
  Form1.Free;
end;

Procedure DoBanking;
var
 x,y,i:integer;
 CFC:longint;
begin
 TalkTo(65536,6,2,'Banker: Talk',6,0,'l d like to access my bank account please',1{option},379,1,'Close window',BankPath);
 if StartCheck then  EmptyBank('Sleeping Bag, Net, Axe, tinderbox, Fishing,');
 for i:=1 to c do
   if GetItem(ItemNamesArr[i],x,y,60,30,450,235) then
   begin
    ClickMouse(x,y,True);
    Wait(1000);
    while(IsTextAt(334,264,'25'))do
    begin
     ClickMouse(335,270,True);
     Wait(300);
    end;
    while(IsTextAt(304,264,'Five'))do
    begin
     ClickMouse(305,270,True);
     Wait(300);
    end;
    while(IsTextAt(274,264,'One'))do
    begin
     ClickMouse(275,270,True);
     Wait(300);
    end;
    GetItemQuanity(X,Y,CFC);
    CurrentFishCount:=CurrentFishCount+CFC;
   end;
 if StartCheck then
 begin
  StartingFishCount:=CurrentFishCount;
  StartCheck:=False;
 end;
 //Close bank window
 Repeat
  ClickMouse(400+random(2),6,True);
  Wait(1000);
 Until (IsTextAt(379,1,'Close window')=False)
 bkc:=bkc+1;
end;
Procedure FindSpot(var x,y:integer);
begin
 repeat
  CloseMenu;
  if Not SpiralFindObj(x,y,-1,x-100,y-100,x+100,y+100,15,UpLine,50,20000) then
  begin
   x:=250;
   y:=160;
  end else ClickMouse(x,y,True);
  Wait(3000);
 until IsTextAt(6,2,UpLine);
end;
Procedure DoFishing;
var
 x,y,Sx,Sy: Integer;
 FT: LongInt;
begin
 x:=250;
 y:=160;
 FindSpot(x,y);
 FT:=GetSystemTime;
 While (Not InvFull) or (FishingM<>1) do
 begin
  SleepNeeded;
  MoveMouse(x,y);
  Wait(100);
  if Not IsTextAt(6,2,UpLine) then FindSpot(x,y);
  ClickMouse(x+Random(1),y+Random(1),False);
  Wait(100);
  if RightClickMenu(Sx,Sy,CatchType)=CatchType then
  begin
   ClickMouse(Sx+2+Random(5),Sy+2+Random(2),True);
   Wait(100);
  end;
  Wait(2250+Random(250));
  CloseMenu;
  if GetSystemTime-FT >=150000 then
  begin
   GoByPath(FishingPath);
   FindSpot(x,y);
   FT:=GetSystemTime;
  end;
 end;
end;
Procedure MakeFire;
var
  x, y, i:integer;
begin
 OpenMenu(1);
 CloseMenu;
 x:=255; y:=160; i:=0;
 while (FindColorSpiral(x,y,727112{tree color},150,5,400,220)) and (GetChatMsg<>'You get some wood') and (i<3) do
 begin
  ClickMouse(x,y,True);
  Wait(3400+Random(100));
  i:=i+1;
 end;
 Wait(100);
 x:=255; y:=160; i:=0;
 while (GetChatMsg<>'The fire catches') and (i<3) do
 begin
  FindItem(x,y,'tinderbox');
  ClickMouse(x,y,True);
  Wait(100);
  if FindColorSpiral(x,y,3758748{logs color},200,130,290,190) then
  begin
   ClickMouse(x,y,False);
   Wait(100);
   RightClickMenu(x,y,'Use tinderbox with Logs');
   ClickMouse(x+3,y+3,True);
   Wait(2900+Random(100));
   i:=i+1;
  end else i:=4;
 end;
end;
Procedure DropBurned;
var
  x, y:integer;
begin
 While FindItem(x,y,'Burnt') do
 begin
  ClickMouse(x,y,False);
  Wait(100);
  ClickMouse(x,y+30,True);
  Wait(1500);
 end;
end;
Procedure DoCooking;
var
  x, y:integer;
  Stop:boolean;
  FT:LongInt;
begin
 Stop:=False;
 OpenMenu(1);
 CloseMenu;
 FT:=GetSystemTime;
 Repeat
   SleepNeeded;
   if FindItem(x,y,'Raw') then
   begin
     ClickMouse(x,y,True);
     Wait(1000);
     if FindColorSpiral(x,y,5422{fire color},200,130,290,190) then
     begin
      ClickMouse(x,y,True);
      Wait(1500+Random(100));
     end else MakeFire;
   end else Stop:=True;
   if GetSystemTime-FT >=150000 then
   begin
    GoByPath(FirePath);
    FT:=GetSystemTime;
   end;
 until Stop;
 DropBurned;
end;
begin
 StartCheck:=True;
 Start:=False;
 CallMainForm;
 StrToStrArr(ItemNames,ItemNamesArr,C);
 if cook=1 then
  for l:=1 to c do
  begin
   TempStr:='Cooked '+ItemNamesArr[l];
   ItemNamesArr[l]:=TempStr;
  end
 else
  for l:=1 to c do
  begin
   TempStr:='Raw '+ItemNamesArr[l];
   ItemNamesArr[l]:=TempStr;
  end;
 AtBank:= CreateLandmark(7, 10, '03000104000A03000104000F03000204001103000104000E010001040003010001040004');
 FishingSpot:= CreateLandmark(12, 7, '04000B01000104002409000104000A01000104000C09000104000B');

 FishingPath:=CreatePath;
 AddLandmarkToPath(FishingPath, FishingSpot, 1, 5);
 AddLandmarkToPath(FishingPath, AtBank, 9, 20);

 FirePath:=CreatePath;
 AddLandmarkToPath(FirePath, FishingSpot, 10, -2);

 BankPath:=CreatePath;
 AddLandmarkToPath(BankPath, AtBank, 10, 8);
 AddLandmarkToPath(BankPath, FishingSpot, 0, -20);
 if Start then
 begin
   LogInIfNeeded;
   Repeat
    Status('Going to fishing spot...');
    GoByPath(FishingPath);
    Status('Fishing...');
    DoFishing;
    if Cook=1 then
    begin
     Status('Going to a tree...');
     GoByPath(FirePath);
     Status('Cooking...');
     DoCooking;
    end;
    Status('Going to bank...');
    GoByPath(BankPath);
    Status('Banking...');
    DoBanking;
   Until False;
 end;
end.
